3.4.74 \(\int \frac {\cot ^4(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\) [374]

Optimal. Leaf size=230 \[ \frac {x}{a^3}-\frac {b^{5/2} \left (63 a^2+36 a b+8 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^3 (a+b)^{9/2} f}+\frac {\left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) \cot (e+f x)}{8 a^2 (a+b)^4 f}-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^3 f}-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )} \]

[Out]

x/a^3-1/8*b^(5/2)*(63*a^2+36*a*b+8*b^2)*arctan(b^(1/2)*tan(f*x+e)/(a+b)^(1/2))/a^3/(a+b)^(9/2)/f+1/8*(8*a^3+32
*a^2*b-15*a*b^2-4*b^3)*cot(f*x+e)/a^2/(a+b)^4/f-1/24*(8*a^2-39*a*b-12*b^2)*cot(f*x+e)^3/a^2/(a+b)^3/f-1/4*b*co
t(f*x+e)^3/a/(a+b)/f/(a+b+b*tan(f*x+e)^2)^2-1/8*b*(11*a+4*b)*cot(f*x+e)^3/a^2/(a+b)^2/f/(a+b+b*tan(f*x+e)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.33, antiderivative size = 230, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {4226, 2000, 483, 593, 597, 536, 209, 211} \begin {gather*} \frac {x}{a^3}-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 f (a+b)^3}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 f (a+b)^2 \left (a+b \tan ^2(e+f x)+b\right )}-\frac {b^{5/2} \left (63 a^2+36 a b+8 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^3 f (a+b)^{9/2}}+\frac {\left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) \cot (e+f x)}{8 a^2 f (a+b)^4}-\frac {b \cot ^3(e+f x)}{4 a f (a+b) \left (a+b \tan ^2(e+f x)+b\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^4/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

x/a^3 - (b^(5/2)*(63*a^2 + 36*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*(a + b)^(9/2)*f)
 + ((8*a^3 + 32*a^2*b - 15*a*b^2 - 4*b^3)*Cot[e + f*x])/(8*a^2*(a + b)^4*f) - ((8*a^2 - 39*a*b - 12*b^2)*Cot[e
 + f*x]^3)/(24*a^2*(a + b)^3*f) - (b*Cot[e + f*x]^3)/(4*a*(a + b)*f*(a + b + b*Tan[e + f*x]^2)^2) - (b*(11*a +
 4*b)*Cot[e + f*x]^3)/(8*a^2*(a + b)^2*f*(a + b + b*Tan[e + f*x]^2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 483

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*(e*
x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*e*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a*d)
*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n
*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ
[p, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 593

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*g*n*(b*c - a*d)*(p +
 1))), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)
*(m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 597

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*c*g*(m + 1))), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 2000

Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*ExpandToSum[u, x]^p*ExpandToSum[v, x]^q
, x] /; FreeQ[{e, m, p, q}, x] && BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0]
&&  !BinomialMatchQ[{u, v}, x]

Rule 4226

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(d*ff*x)^m*((a + b*(1 + ff^2*x^2)^(n/2))^p/(1 + ff^2
*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && IntegerQ[n/2] && (IntegerQ[m/2] ||
EqQ[n, 2])

Rubi steps

\begin {align*} \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac {\text {Subst}\left (\int \frac {4 a-3 b-7 b x^2}{x^4 \left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a (a+b) f}\\ &=-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2-39 a b-12 b^2-5 b (11 a+4 b) x^2}{x^4 \left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a+b)^2 f}\\ &=-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^3 f}-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {3 \left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right )+3 b \left (8 a^2-39 a b-12 b^2\right ) x^2}{x^2 \left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{24 a^2 (a+b)^3 f}\\ &=\frac {\left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) \cot (e+f x)}{8 a^2 (a+b)^4 f}-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^3 f}-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {3 \left (8 a^4+40 a^3 b+80 a^2 b^2+17 a b^3+4 b^4\right )+3 b \left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{24 a^2 (a+b)^4 f}\\ &=\frac {\left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) \cot (e+f x)}{8 a^2 (a+b)^4 f}-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^3 f}-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{a^3 f}-\frac {\left (b^3 \left (63 a^2+36 a b+8 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^3 (a+b)^4 f}\\ &=\frac {x}{a^3}-\frac {b^{5/2} \left (63 a^2+36 a b+8 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{8 a^3 (a+b)^{9/2} f}+\frac {\left (8 a^3+32 a^2 b-15 a b^2-4 b^3\right ) \cot (e+f x)}{8 a^2 (a+b)^4 f}-\frac {\left (8 a^2-39 a b-12 b^2\right ) \cot ^3(e+f x)}{24 a^2 (a+b)^3 f}-\frac {b \cot ^3(e+f x)}{4 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac {b (11 a+4 b) \cot ^3(e+f x)}{8 a^2 (a+b)^2 f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 7.83, size = 3340, normalized size = 14.52 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[e + f*x]^4/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

((63*a^2 + 36*a*b + 8*b^2)*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*((b^3*ArcTan[Sec[f*x]*(Cos[2*e]/(2*
Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))
*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(64*a^3*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[
4*e]]) - ((I/64)*b^3*ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2*
e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Sin[2*e]
)/(a^3*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]])))/((a + b)^4*(a + b*Sec[e + f*x]^2)^3) + ((a + 2*b + a*C
os[2*e + 2*f*x])*Csc[e]*Csc[e + f*x]^3*Sec[2*e]*Sec[e + f*x]^6*(-36*a^6*f*x*Cos[f*x] - 336*a^5*b*f*x*Cos[f*x]
- 1560*a^4*b^2*f*x*Cos[f*x] - 3600*a^3*b^3*f*x*Cos[f*x] - 4260*a^2*b^4*f*x*Cos[f*x] - 2496*a*b^5*f*x*Cos[f*x]
- 576*b^6*f*x*Cos[f*x] + 36*a^6*f*x*Cos[3*f*x] + 240*a^5*b*f*x*Cos[3*f*x] + 408*a^4*b^2*f*x*Cos[3*f*x] - 48*a^
3*b^3*f*x*Cos[3*f*x] - 732*a^2*b^4*f*x*Cos[3*f*x] - 672*a*b^5*f*x*Cos[3*f*x] - 192*b^6*f*x*Cos[3*f*x] + 36*a^6
*f*x*Cos[2*e - f*x] + 336*a^5*b*f*x*Cos[2*e - f*x] + 1560*a^4*b^2*f*x*Cos[2*e - f*x] + 3600*a^3*b^3*f*x*Cos[2*
e - f*x] + 4260*a^2*b^4*f*x*Cos[2*e - f*x] + 2496*a*b^5*f*x*Cos[2*e - f*x] + 576*b^6*f*x*Cos[2*e - f*x] + 36*a
^6*f*x*Cos[2*e + f*x] + 336*a^5*b*f*x*Cos[2*e + f*x] + 1560*a^4*b^2*f*x*Cos[2*e + f*x] + 3600*a^3*b^3*f*x*Cos[
2*e + f*x] + 4260*a^2*b^4*f*x*Cos[2*e + f*x] + 2496*a*b^5*f*x*Cos[2*e + f*x] + 576*b^6*f*x*Cos[2*e + f*x] - 36
*a^6*f*x*Cos[4*e + f*x] - 336*a^5*b*f*x*Cos[4*e + f*x] - 1560*a^4*b^2*f*x*Cos[4*e + f*x] - 3600*a^3*b^3*f*x*Co
s[4*e + f*x] - 4260*a^2*b^4*f*x*Cos[4*e + f*x] - 2496*a*b^5*f*x*Cos[4*e + f*x] - 576*b^6*f*x*Cos[4*e + f*x] -
36*a^6*f*x*Cos[2*e + 3*f*x] - 240*a^5*b*f*x*Cos[2*e + 3*f*x] - 408*a^4*b^2*f*x*Cos[2*e + 3*f*x] + 48*a^3*b^3*f
*x*Cos[2*e + 3*f*x] + 732*a^2*b^4*f*x*Cos[2*e + 3*f*x] + 672*a*b^5*f*x*Cos[2*e + 3*f*x] + 192*b^6*f*x*Cos[2*e
+ 3*f*x] + 36*a^6*f*x*Cos[4*e + 3*f*x] + 240*a^5*b*f*x*Cos[4*e + 3*f*x] + 408*a^4*b^2*f*x*Cos[4*e + 3*f*x] - 4
8*a^3*b^3*f*x*Cos[4*e + 3*f*x] - 732*a^2*b^4*f*x*Cos[4*e + 3*f*x] - 672*a*b^5*f*x*Cos[4*e + 3*f*x] - 192*b^6*f
*x*Cos[4*e + 3*f*x] - 36*a^6*f*x*Cos[6*e + 3*f*x] - 240*a^5*b*f*x*Cos[6*e + 3*f*x] - 408*a^4*b^2*f*x*Cos[6*e +
 3*f*x] + 48*a^3*b^3*f*x*Cos[6*e + 3*f*x] + 732*a^2*b^4*f*x*Cos[6*e + 3*f*x] + 672*a*b^5*f*x*Cos[6*e + 3*f*x]
+ 192*b^6*f*x*Cos[6*e + 3*f*x] - 12*a^6*f*x*Cos[2*e + 5*f*x] - 144*a^5*b*f*x*Cos[2*e + 5*f*x] - 456*a^4*b^2*f*
x*Cos[2*e + 5*f*x] - 624*a^3*b^3*f*x*Cos[2*e + 5*f*x] - 396*a^2*b^4*f*x*Cos[2*e + 5*f*x] - 96*a*b^5*f*x*Cos[2*
e + 5*f*x] + 12*a^6*f*x*Cos[4*e + 5*f*x] + 144*a^5*b*f*x*Cos[4*e + 5*f*x] + 456*a^4*b^2*f*x*Cos[4*e + 5*f*x] +
 624*a^3*b^3*f*x*Cos[4*e + 5*f*x] + 396*a^2*b^4*f*x*Cos[4*e + 5*f*x] + 96*a*b^5*f*x*Cos[4*e + 5*f*x] - 12*a^6*
f*x*Cos[6*e + 5*f*x] - 144*a^5*b*f*x*Cos[6*e + 5*f*x] - 456*a^4*b^2*f*x*Cos[6*e + 5*f*x] - 624*a^3*b^3*f*x*Cos
[6*e + 5*f*x] - 396*a^2*b^4*f*x*Cos[6*e + 5*f*x] - 96*a*b^5*f*x*Cos[6*e + 5*f*x] + 12*a^6*f*x*Cos[8*e + 5*f*x]
 + 144*a^5*b*f*x*Cos[8*e + 5*f*x] + 456*a^4*b^2*f*x*Cos[8*e + 5*f*x] + 624*a^3*b^3*f*x*Cos[8*e + 5*f*x] + 396*
a^2*b^4*f*x*Cos[8*e + 5*f*x] + 96*a*b^5*f*x*Cos[8*e + 5*f*x] - 12*a^6*f*x*Cos[4*e + 7*f*x] - 48*a^5*b*f*x*Cos[
4*e + 7*f*x] - 72*a^4*b^2*f*x*Cos[4*e + 7*f*x] - 48*a^3*b^3*f*x*Cos[4*e + 7*f*x] - 12*a^2*b^4*f*x*Cos[4*e + 7*
f*x] + 12*a^6*f*x*Cos[6*e + 7*f*x] + 48*a^5*b*f*x*Cos[6*e + 7*f*x] + 72*a^4*b^2*f*x*Cos[6*e + 7*f*x] + 48*a^3*
b^3*f*x*Cos[6*e + 7*f*x] + 12*a^2*b^4*f*x*Cos[6*e + 7*f*x] - 12*a^6*f*x*Cos[8*e + 7*f*x] - 48*a^5*b*f*x*Cos[8*
e + 7*f*x] - 72*a^4*b^2*f*x*Cos[8*e + 7*f*x] - 48*a^3*b^3*f*x*Cos[8*e + 7*f*x] - 12*a^2*b^4*f*x*Cos[8*e + 7*f*
x] + 12*a^6*f*x*Cos[10*e + 7*f*x] + 48*a^5*b*f*x*Cos[10*e + 7*f*x] + 72*a^4*b^2*f*x*Cos[10*e + 7*f*x] + 48*a^3
*b^3*f*x*Cos[10*e + 7*f*x] + 12*a^2*b^4*f*x*Cos[10*e + 7*f*x] - 128*a^6*Sin[f*x] - 440*a^5*b*Sin[f*x] - 1152*a
^4*b^2*Sin[f*x] - 1920*a^3*b^3*Sin[f*x] + 228*a^2*b^4*Sin[f*x] + 1320*a*b^5*Sin[f*x] + 432*b^6*Sin[f*x] + 48*a
^6*Sin[3*f*x] + 104*a^5*b*Sin[3*f*x] + 640*a^4*b^2*Sin[3*f*x] + 1511*a^3*b^3*Sin[3*f*x] - 528*a^2*b^4*Sin[3*f*
x] + 264*a*b^5*Sin[3*f*x] + 144*b^6*Sin[3*f*x] - 32*a^6*Sin[2*e - f*x] + 384*a^5*b*Sin[2*e - f*x] + 2048*a^4*b
^2*Sin[2*e - f*x] + 3072*a^3*b^3*Sin[2*e - f*x] + 228*a^2*b^4*Sin[2*e - f*x] + 1320*a*b^5*Sin[2*e - f*x] + 432
*b^6*Sin[2*e - f*x] + 32*a^6*Sin[2*e + f*x] - 384*a^5*b*Sin[2*e + f*x] - 2048*a^4*b^2*Sin[2*e + f*x] - 2919*a^
3*b^3*Sin[2*e + f*x] + 642*a^2*b^4*Sin[2*e + f*x] + 1416*a*b^5*Sin[2*e + f*x] + 432*b^6*Sin[2*e + f*x] - 128*a
^6*Sin[4*e + f*x] - 440*a^5*b*Sin[4*e + f*x] - 1152*a^4*b^2*Sin[4*e + f*x] - 2073*a^3*b^3*Sin[4*e + f*x] - 642
*a^2*b^4*Sin[4*e + f*x] - 1416*a*b^5*Sin[4*e + f*x] - 432*b^6*Sin[4*e + f*x] - 144*a^6*Sin[2*e + 3*f*x] - 672*
a^5*b*Sin[2*e + 3*f*x] - 960*a^4*b^2*Sin[2*e + 3*f*x] + 153*a^3*b^3*Sin[2*e + 3*f*x] + 528*a^2*b^4*Sin[2*e + 3
*f*x] - 264*a*b^5*Sin[2*e + 3*f*x] - 144*b^6*Si...

________________________________________________________________________________________

Maple [A]
time = 0.27, size = 171, normalized size = 0.74

method result size
derivativedivides \(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{3}}-\frac {1}{3 \left (a +b \right )^{3} \tan \left (f x +e \right )^{3}}-\frac {-a -4 b}{\left (a +b \right )^{4} \tan \left (f x +e \right )}-\frac {b^{3} \left (\frac {\left (\frac {15}{8} a^{2} b +\frac {1}{2} a \,b^{2}\right ) \left (\tan ^{3}\left (f x +e \right )\right )+\frac {a \left (17 a^{2}+21 a b +4 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (63 a^{2}+36 a b +8 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \sqrt {\left (a +b \right ) b}}\right )}{a^{3} \left (a +b \right )^{4}}}{f}\) \(171\)
default \(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{3}}-\frac {1}{3 \left (a +b \right )^{3} \tan \left (f x +e \right )^{3}}-\frac {-a -4 b}{\left (a +b \right )^{4} \tan \left (f x +e \right )}-\frac {b^{3} \left (\frac {\left (\frac {15}{8} a^{2} b +\frac {1}{2} a \,b^{2}\right ) \left (\tan ^{3}\left (f x +e \right )\right )+\frac {a \left (17 a^{2}+21 a b +4 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (63 a^{2}+36 a b +8 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{8 \sqrt {\left (a +b \right ) b}}\right )}{a^{3} \left (a +b \right )^{4}}}{f}\) \(171\)
risch \(\frac {x}{a^{3}}-\frac {i \left (-48 a^{6} {\mathrm e}^{4 i \left (f x +e \right )}-144 b^{6} {\mathrm e}^{4 i \left (f x +e \right )}-80 a^{6} {\mathrm e}^{2 i \left (f x +e \right )}-48 a^{6} {\mathrm e}^{12 i \left (f x +e \right )}-144 a^{6} {\mathrm e}^{10 i \left (f x +e \right )}+144 b^{6} {\mathrm e}^{10 i \left (f x +e \right )}-128 a^{6} {\mathrm e}^{8 i \left (f x +e \right )}-432 b^{6} {\mathrm e}^{8 i \left (f x +e \right )}-32 a^{6} {\mathrm e}^{6 i \left (f x +e \right )}+432 b^{6} {\mathrm e}^{6 i \left (f x +e \right )}-832 a^{4} b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+51 a^{3} b^{3} {\mathrm e}^{12 i \left (f x +e \right )}-1511 a^{3} b^{3} {\mathrm e}^{4 i \left (f x +e \right )}-104 a^{5} b -51 a^{3} b^{3}-18 a^{2} b^{4}-32 a^{6}-120 a^{5} b \,{\mathrm e}^{12 i \left (f x +e \right )}+132 a^{2} b^{4} {\mathrm e}^{12 i \left (f x +e \right )}+48 a \,b^{5} {\mathrm e}^{12 i \left (f x +e \right )}-672 a^{5} b \,{\mathrm e}^{10 i \left (f x +e \right )}-960 a^{4} b^{2} {\mathrm e}^{10 i \left (f x +e \right )}+66 a^{2} b^{4} {\mathrm e}^{10 i \left (f x +e \right )}-264 a \,b^{5} {\mathrm e}^{4 i \left (f x +e \right )}-480 a^{5} b \,{\mathrm e}^{2 i \left (f x +e \right )}+408 a \,b^{5} {\mathrm e}^{10 i \left (f x +e \right )}-440 a^{5} b \,{\mathrm e}^{8 i \left (f x +e \right )}-1152 a^{4} b^{2} {\mathrm e}^{8 i \left (f x +e \right )}-2073 a^{3} b^{3} {\mathrm e}^{8 i \left (f x +e \right )}-642 a^{2} b^{4} {\mathrm e}^{8 i \left (f x +e \right )}-1416 a \,b^{5} {\mathrm e}^{8 i \left (f x +e \right )}+384 a^{5} b \,{\mathrm e}^{6 i \left (f x +e \right )}+2048 a^{4} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-640 a^{4} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+528 a^{2} b^{4} {\mathrm e}^{4 i \left (f x +e \right )}-294 a^{2} b^{4} {\mathrm e}^{2 i \left (f x +e \right )}-96 a \,b^{5} {\mathrm e}^{2 i \left (f x +e \right )}+3072 a^{3} b^{3} {\mathrm e}^{6 i \left (f x +e \right )}+228 a^{2} b^{4} {\mathrm e}^{6 i \left (f x +e \right )}+1320 a \,b^{5} {\mathrm e}^{6 i \left (f x +e \right )}-104 a^{5} b \,{\mathrm e}^{4 i \left (f x +e \right )}\right )}{12 a^{3} f \left (a +b \right )^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}+\frac {63 \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{16 \left (a +b \right )^{5} f a}+\frac {9 \sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{4 \left (a +b \right )^{5} f \,a^{2}}+\frac {\sqrt {-\left (a +b \right ) b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{2 \left (a +b \right )^{5} f \,a^{3}}-\frac {63 \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{16 \left (a +b \right )^{5} f a}-\frac {9 \sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{4 \left (a +b \right )^{5} f \,a^{2}}-\frac {\sqrt {-\left (a +b \right ) b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{2 \left (a +b \right )^{5} f \,a^{3}}\) \(1015\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(1/a^3*arctan(tan(f*x+e))-1/3/(a+b)^3/tan(f*x+e)^3-(-a-4*b)/(a+b)^4/tan(f*x+e)-b^3/a^3/(a+b)^4*(((15/8*a^2
*b+1/2*a*b^2)*tan(f*x+e)^3+1/8*a*(17*a^2+21*a*b+4*b^2)*tan(f*x+e))/(a+b+b*tan(f*x+e)^2)^2+1/8*(63*a^2+36*a*b+8
*b^2)/((a+b)*b)^(1/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2))))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 417, normalized size = 1.81 \begin {gather*} -\frac {\frac {3 \, {\left (63 \, a^{2} b^{3} + 36 \, a b^{4} + 8 \, b^{5}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{7} + 4 \, a^{6} b + 6 \, a^{5} b^{2} + 4 \, a^{4} b^{3} + a^{3} b^{4}\right )} \sqrt {{\left (a + b\right )} b}} - \frac {3 \, {\left (8 \, a^{3} b^{2} + 32 \, a^{2} b^{3} - 15 \, a b^{4} - 4 \, b^{5}\right )} \tan \left (f x + e\right )^{6} - 8 \, a^{5} - 24 \, a^{4} b - 24 \, a^{3} b^{2} - 8 \, a^{2} b^{3} + {\left (48 \, a^{4} b + 232 \, a^{3} b^{2} + 133 \, a^{2} b^{3} - 63 \, a b^{4} - 12 \, b^{5}\right )} \tan \left (f x + e\right )^{4} + 8 \, {\left (3 \, a^{5} + 16 \, a^{4} b + 23 \, a^{3} b^{2} + 10 \, a^{2} b^{3}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{6} b^{2} + 4 \, a^{5} b^{3} + 6 \, a^{4} b^{4} + 4 \, a^{3} b^{5} + a^{2} b^{6}\right )} \tan \left (f x + e\right )^{7} + 2 \, {\left (a^{7} b + 5 \, a^{6} b^{2} + 10 \, a^{5} b^{3} + 10 \, a^{4} b^{4} + 5 \, a^{3} b^{5} + a^{2} b^{6}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{8} + 6 \, a^{7} b + 15 \, a^{6} b^{2} + 20 \, a^{5} b^{3} + 15 \, a^{4} b^{4} + 6 \, a^{3} b^{5} + a^{2} b^{6}\right )} \tan \left (f x + e\right )^{3}} - \frac {24 \, {\left (f x + e\right )}}{a^{3}}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

-1/24*(3*(63*a^2*b^3 + 36*a*b^4 + 8*b^5)*arctan(b*tan(f*x + e)/sqrt((a + b)*b))/((a^7 + 4*a^6*b + 6*a^5*b^2 +
4*a^4*b^3 + a^3*b^4)*sqrt((a + b)*b)) - (3*(8*a^3*b^2 + 32*a^2*b^3 - 15*a*b^4 - 4*b^5)*tan(f*x + e)^6 - 8*a^5
- 24*a^4*b - 24*a^3*b^2 - 8*a^2*b^3 + (48*a^4*b + 232*a^3*b^2 + 133*a^2*b^3 - 63*a*b^4 - 12*b^5)*tan(f*x + e)^
4 + 8*(3*a^5 + 16*a^4*b + 23*a^3*b^2 + 10*a^2*b^3)*tan(f*x + e)^2)/((a^6*b^2 + 4*a^5*b^3 + 6*a^4*b^4 + 4*a^3*b
^5 + a^2*b^6)*tan(f*x + e)^7 + 2*(a^7*b + 5*a^6*b^2 + 10*a^5*b^3 + 10*a^4*b^4 + 5*a^3*b^5 + a^2*b^6)*tan(f*x +
 e)^5 + (a^8 + 6*a^7*b + 15*a^6*b^2 + 20*a^5*b^3 + 15*a^4*b^4 + 6*a^3*b^5 + a^2*b^6)*tan(f*x + e)^3) - 24*(f*x
 + e)/a^3)/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 800 vs. \(2 (219) = 438\).
time = 4.07, size = 1691, normalized size = 7.35 \begin {gather*} \left [\frac {4 \, {\left (32 \, a^{6} + 104 \, a^{5} b + 51 \, a^{3} b^{3} + 18 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{7} - 4 \, {\left (24 \, a^{6} + 32 \, a^{5} b - 208 \, a^{4} b^{2} + 102 \, a^{3} b^{3} - 9 \, a^{2} b^{4} - 12 \, a b^{5}\right )} \cos \left (f x + e\right )^{5} - 4 \, {\left (48 \, a^{5} b + 160 \, a^{4} b^{2} - 155 \, a^{3} b^{3} + 72 \, a^{2} b^{4} + 24 \, a b^{5}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left ({\left (63 \, a^{4} b^{2} + 36 \, a^{3} b^{3} + 8 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{6} - 63 \, a^{2} b^{4} - 36 \, a b^{5} - 8 \, b^{6} - {\left (63 \, a^{4} b^{2} - 90 \, a^{3} b^{3} - 64 \, a^{2} b^{4} - 16 \, a b^{5}\right )} \cos \left (f x + e\right )^{4} - {\left (126 \, a^{3} b^{3} + 9 \, a^{2} b^{4} - 20 \, a b^{5} - 8 \, b^{6}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) - 12 \, {\left (8 \, a^{4} b^{2} + 32 \, a^{3} b^{3} - 15 \, a^{2} b^{4} - 4 \, a b^{5}\right )} \cos \left (f x + e\right ) + 96 \, {\left ({\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4}\right )} f x \cos \left (f x + e\right )^{6} - {\left (a^{6} + 2 \, a^{5} b - 2 \, a^{4} b^{2} - 8 \, a^{3} b^{3} - 7 \, a^{2} b^{4} - 2 \, a b^{5}\right )} f x \cos \left (f x + e\right )^{4} - {\left (2 \, a^{5} b + 7 \, a^{4} b^{2} + 8 \, a^{3} b^{3} + 2 \, a^{2} b^{4} - 2 \, a b^{5} - b^{6}\right )} f x \cos \left (f x + e\right )^{2} - {\left (a^{4} b^{2} + 4 \, a^{3} b^{3} + 6 \, a^{2} b^{4} + 4 \, a b^{5} + b^{6}\right )} f x\right )} \sin \left (f x + e\right )}{96 \, {\left ({\left (a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} f \cos \left (f x + e\right )^{6} - {\left (a^{9} + 2 \, a^{8} b - 2 \, a^{7} b^{2} - 8 \, a^{6} b^{3} - 7 \, a^{5} b^{4} - 2 \, a^{4} b^{5}\right )} f \cos \left (f x + e\right )^{4} - {\left (2 \, a^{8} b + 7 \, a^{7} b^{2} + 8 \, a^{6} b^{3} + 2 \, a^{5} b^{4} - 2 \, a^{4} b^{5} - a^{3} b^{6}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{7} b^{2} + 4 \, a^{6} b^{3} + 6 \, a^{5} b^{4} + 4 \, a^{4} b^{5} + a^{3} b^{6}\right )} f\right )} \sin \left (f x + e\right )}, \frac {2 \, {\left (32 \, a^{6} + 104 \, a^{5} b + 51 \, a^{3} b^{3} + 18 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{7} - 2 \, {\left (24 \, a^{6} + 32 \, a^{5} b - 208 \, a^{4} b^{2} + 102 \, a^{3} b^{3} - 9 \, a^{2} b^{4} - 12 \, a b^{5}\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (48 \, a^{5} b + 160 \, a^{4} b^{2} - 155 \, a^{3} b^{3} + 72 \, a^{2} b^{4} + 24 \, a b^{5}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left ({\left (63 \, a^{4} b^{2} + 36 \, a^{3} b^{3} + 8 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{6} - 63 \, a^{2} b^{4} - 36 \, a b^{5} - 8 \, b^{6} - {\left (63 \, a^{4} b^{2} - 90 \, a^{3} b^{3} - 64 \, a^{2} b^{4} - 16 \, a b^{5}\right )} \cos \left (f x + e\right )^{4} - {\left (126 \, a^{3} b^{3} + 9 \, a^{2} b^{4} - 20 \, a b^{5} - 8 \, b^{6}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 6 \, {\left (8 \, a^{4} b^{2} + 32 \, a^{3} b^{3} - 15 \, a^{2} b^{4} - 4 \, a b^{5}\right )} \cos \left (f x + e\right ) + 48 \, {\left ({\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4}\right )} f x \cos \left (f x + e\right )^{6} - {\left (a^{6} + 2 \, a^{5} b - 2 \, a^{4} b^{2} - 8 \, a^{3} b^{3} - 7 \, a^{2} b^{4} - 2 \, a b^{5}\right )} f x \cos \left (f x + e\right )^{4} - {\left (2 \, a^{5} b + 7 \, a^{4} b^{2} + 8 \, a^{3} b^{3} + 2 \, a^{2} b^{4} - 2 \, a b^{5} - b^{6}\right )} f x \cos \left (f x + e\right )^{2} - {\left (a^{4} b^{2} + 4 \, a^{3} b^{3} + 6 \, a^{2} b^{4} + 4 \, a b^{5} + b^{6}\right )} f x\right )} \sin \left (f x + e\right )}{48 \, {\left ({\left (a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} f \cos \left (f x + e\right )^{6} - {\left (a^{9} + 2 \, a^{8} b - 2 \, a^{7} b^{2} - 8 \, a^{6} b^{3} - 7 \, a^{5} b^{4} - 2 \, a^{4} b^{5}\right )} f \cos \left (f x + e\right )^{4} - {\left (2 \, a^{8} b + 7 \, a^{7} b^{2} + 8 \, a^{6} b^{3} + 2 \, a^{5} b^{4} - 2 \, a^{4} b^{5} - a^{3} b^{6}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{7} b^{2} + 4 \, a^{6} b^{3} + 6 \, a^{5} b^{4} + 4 \, a^{4} b^{5} + a^{3} b^{6}\right )} f\right )} \sin \left (f x + e\right )}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[1/96*(4*(32*a^6 + 104*a^5*b + 51*a^3*b^3 + 18*a^2*b^4)*cos(f*x + e)^7 - 4*(24*a^6 + 32*a^5*b - 208*a^4*b^2 +
102*a^3*b^3 - 9*a^2*b^4 - 12*a*b^5)*cos(f*x + e)^5 - 4*(48*a^5*b + 160*a^4*b^2 - 155*a^3*b^3 + 72*a^2*b^4 + 24
*a*b^5)*cos(f*x + e)^3 + 3*((63*a^4*b^2 + 36*a^3*b^3 + 8*a^2*b^4)*cos(f*x + e)^6 - 63*a^2*b^4 - 36*a*b^5 - 8*b
^6 - (63*a^4*b^2 - 90*a^3*b^3 - 64*a^2*b^4 - 16*a*b^5)*cos(f*x + e)^4 - (126*a^3*b^3 + 9*a^2*b^4 - 20*a*b^5 -
8*b^6)*cos(f*x + e)^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f*x
+ e)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2)*cos(f*x + e))*sqrt(-b/(a + b))*sin(f*x + e) + b
^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2))*sin(f*x + e) - 12*(8*a^4*b^2 + 32*a^3*b^3 - 15*a^2*b^4
- 4*a*b^5)*cos(f*x + e) + 96*((a^6 + 4*a^5*b + 6*a^4*b^2 + 4*a^3*b^3 + a^2*b^4)*f*x*cos(f*x + e)^6 - (a^6 + 2*
a^5*b - 2*a^4*b^2 - 8*a^3*b^3 - 7*a^2*b^4 - 2*a*b^5)*f*x*cos(f*x + e)^4 - (2*a^5*b + 7*a^4*b^2 + 8*a^3*b^3 + 2
*a^2*b^4 - 2*a*b^5 - b^6)*f*x*cos(f*x + e)^2 - (a^4*b^2 + 4*a^3*b^3 + 6*a^2*b^4 + 4*a*b^5 + b^6)*f*x)*sin(f*x
+ e))/(((a^9 + 4*a^8*b + 6*a^7*b^2 + 4*a^6*b^3 + a^5*b^4)*f*cos(f*x + e)^6 - (a^9 + 2*a^8*b - 2*a^7*b^2 - 8*a^
6*b^3 - 7*a^5*b^4 - 2*a^4*b^5)*f*cos(f*x + e)^4 - (2*a^8*b + 7*a^7*b^2 + 8*a^6*b^3 + 2*a^5*b^4 - 2*a^4*b^5 - a
^3*b^6)*f*cos(f*x + e)^2 - (a^7*b^2 + 4*a^6*b^3 + 6*a^5*b^4 + 4*a^4*b^5 + a^3*b^6)*f)*sin(f*x + e)), 1/48*(2*(
32*a^6 + 104*a^5*b + 51*a^3*b^3 + 18*a^2*b^4)*cos(f*x + e)^7 - 2*(24*a^6 + 32*a^5*b - 208*a^4*b^2 + 102*a^3*b^
3 - 9*a^2*b^4 - 12*a*b^5)*cos(f*x + e)^5 - 2*(48*a^5*b + 160*a^4*b^2 - 155*a^3*b^3 + 72*a^2*b^4 + 24*a*b^5)*co
s(f*x + e)^3 + 3*((63*a^4*b^2 + 36*a^3*b^3 + 8*a^2*b^4)*cos(f*x + e)^6 - 63*a^2*b^4 - 36*a*b^5 - 8*b^6 - (63*a
^4*b^2 - 90*a^3*b^3 - 64*a^2*b^4 - 16*a*b^5)*cos(f*x + e)^4 - (126*a^3*b^3 + 9*a^2*b^4 - 20*a*b^5 - 8*b^6)*cos
(f*x + e)^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f*x + e)*sin(f*x
 + e)))*sin(f*x + e) - 6*(8*a^4*b^2 + 32*a^3*b^3 - 15*a^2*b^4 - 4*a*b^5)*cos(f*x + e) + 48*((a^6 + 4*a^5*b + 6
*a^4*b^2 + 4*a^3*b^3 + a^2*b^4)*f*x*cos(f*x + e)^6 - (a^6 + 2*a^5*b - 2*a^4*b^2 - 8*a^3*b^3 - 7*a^2*b^4 - 2*a*
b^5)*f*x*cos(f*x + e)^4 - (2*a^5*b + 7*a^4*b^2 + 8*a^3*b^3 + 2*a^2*b^4 - 2*a*b^5 - b^6)*f*x*cos(f*x + e)^2 - (
a^4*b^2 + 4*a^3*b^3 + 6*a^2*b^4 + 4*a*b^5 + b^6)*f*x)*sin(f*x + e))/(((a^9 + 4*a^8*b + 6*a^7*b^2 + 4*a^6*b^3 +
 a^5*b^4)*f*cos(f*x + e)^6 - (a^9 + 2*a^8*b - 2*a^7*b^2 - 8*a^6*b^3 - 7*a^5*b^4 - 2*a^4*b^5)*f*cos(f*x + e)^4
- (2*a^8*b + 7*a^7*b^2 + 8*a^6*b^3 + 2*a^5*b^4 - 2*a^4*b^5 - a^3*b^6)*f*cos(f*x + e)^2 - (a^7*b^2 + 4*a^6*b^3
+ 6*a^5*b^4 + 4*a^4*b^5 + a^3*b^6)*f)*sin(f*x + e))]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**4/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.60, size = 302, normalized size = 1.31 \begin {gather*} -\frac {\frac {3 \, {\left (63 \, a^{2} b^{3} + 36 \, a b^{4} + 8 \, b^{5}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{{\left (a^{7} + 4 \, a^{6} b + 6 \, a^{5} b^{2} + 4 \, a^{4} b^{3} + a^{3} b^{4}\right )} \sqrt {a b + b^{2}}} + \frac {3 \, {\left (15 \, a b^{4} \tan \left (f x + e\right )^{3} + 4 \, b^{5} \tan \left (f x + e\right )^{3} + 17 \, a^{2} b^{3} \tan \left (f x + e\right ) + 21 \, a b^{4} \tan \left (f x + e\right ) + 4 \, b^{5} \tan \left (f x + e\right )\right )}}{{\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4}\right )} {\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2}} - \frac {24 \, {\left (f x + e\right )}}{a^{3}} - \frac {8 \, {\left (3 \, a \tan \left (f x + e\right )^{2} + 12 \, b \tan \left (f x + e\right )^{2} - a - b\right )}}{{\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (f x + e\right )^{3}}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/24*(3*(63*a^2*b^3 + 36*a*b^4 + 8*b^5)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b
 + b^2)))/((a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + a^3*b^4)*sqrt(a*b + b^2)) + 3*(15*a*b^4*tan(f*x + e)^3 + 4
*b^5*tan(f*x + e)^3 + 17*a^2*b^3*tan(f*x + e) + 21*a*b^4*tan(f*x + e) + 4*b^5*tan(f*x + e))/((a^6 + 4*a^5*b +
6*a^4*b^2 + 4*a^3*b^3 + a^2*b^4)*(b*tan(f*x + e)^2 + a + b)^2) - 24*(f*x + e)/a^3 - 8*(3*a*tan(f*x + e)^2 + 12
*b*tan(f*x + e)^2 - a - b)/((a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*tan(f*x + e)^3))/f

________________________________________________________________________________________

Mupad [B]
time = 11.98, size = 2500, normalized size = 10.87 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^4/(a + b/cos(e + f*x)^2)^3,x)

[Out]

atan((860160*a^6*b^20*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18 + 570587136*a^9*
b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768*a^13*b^13 + 1703873740
8*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 3502829568*a^18*b^8 + 1329
527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*a^23*b^3 + 65536*a^24*b
^2) + (14515200*a^7*b^19*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18 + 570587136*a
^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768*a^13*b^13 + 1703873
7408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 3502829568*a^18*b^8 + 1
329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*a^23*b^3 + 65536*a^2
4*b^2) + (115347456*a^8*b^18*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18 + 5705871
36*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768*a^13*b^13 + 170
38737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 3502829568*a^18*b^8
 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*a^23*b^3 + 65536
*a^24*b^2) + (570587136*a^9*b^17*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18 + 570
587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768*a^13*b^13 +
 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 3502829568*a^18
*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*a^23*b^3 + 6
5536*a^24*b^2) + (1961717760*a^10*b^16*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18
 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768*a^13*
b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 350282956
8*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*a^23*b
^3 + 65536*a^24*b^2) + (4965811200*a^11*b^15*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347456*a^
8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379552768
*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9 + 350
2829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 1376256*
a^23*b^3 + 65536*a^24*b^2) + (9577308160*a^12*b^14*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 + 115347
456*a^8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14 + 14379
552768*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a^17*b^9
 + 3502829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b^4 + 13
76256*a^23*b^3 + 65536*a^24*b^2) + (14379552768*a^13*b^13*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7*b^19 +
 115347456*a^8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^12*b^14
+ 14379552768*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 7294187520*a
^17*b^9 + 3502829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560*a^22*b
^4 + 1376256*a^23*b^3 + 65536*a^24*b^2) + (17038737408*a^14*b^12*tan(e + f*x))/(860160*a^6*b^20 + 14515200*a^7
*b^19 + 115347456*a^8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308160*a^1
2*b^14 + 14379552768*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10 + 72941
87520*a^17*b^9 + 3502829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 13762560
*a^22*b^4 + 1376256*a^23*b^3 + 65536*a^24*b^2) + (16066462720*a^15*b^11*tan(e + f*x))/(860160*a^6*b^20 + 14515
200*a^7*b^19 + 115347456*a^8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 + 9577308
160*a^12*b^14 + 14379552768*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^16*b^10
+ 7294187520*a^17*b^9 + 3502829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*b^5 + 1
3762560*a^22*b^4 + 1376256*a^23*b^3 + 65536*a^24*b^2) + (12106321920*a^16*b^10*tan(e + f*x))/(860160*a^6*b^20
+ 14515200*a^7*b^19 + 115347456*a^8*b^18 + 570587136*a^9*b^17 + 1961717760*a^10*b^16 + 4965811200*a^11*b^15 +
9577308160*a^12*b^14 + 14379552768*a^13*b^13 + 17038737408*a^14*b^12 + 16066462720*a^15*b^11 + 12106321920*a^1
6*b^10 + 7294187520*a^17*b^9 + 3502829568*a^18*b^8 + 1329527808*a^19*b^7 + 392232960*a^20*b^6 + 87162880*a^21*
b^5 + 13762560*a^22*b^4 + 1376256*a^23*b^3 + 65536*a^24*b^2) + (7294187520*a^17*b^9*tan(e + f*x))/(860160*a^6*
b^20 + 14515200*a^7*b^19 + 115347456*a^8*b^18 +...

________________________________________________________________________________________